package com.hulu.yec.sys.user.entity;

import java.util.List;

import org.apache.commons.lang3.StringUtils;

/**
 * 这是用来传递条件查询的实体
 * 
 * @author hf001
 * 2016年3月9日
 */
public class SearchCondition {
	private String name;
	private String roleName;
	private int state;
	private String className;
	private List<String> roleList;
	private List<String> classList;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getRoleName() {
		return roleName;
	}
	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}
	public int getState() {
		return state;
	}
	public void setState(int state) {
		this.state = state;
	}
	public void setState(String state) {
		if("无效".equals(StringUtils.trim(state))){
			this.state = 2;
		}else if("有效".equals(StringUtils.trim(state))){
			this.state = 1;
		}
	}
	public String getStateStr() {
		if(this.state == 1){
			return "有效";
		}else if(this.state ==2){
			return "无效";
		}else{
			return "";
		}
	}
	public String getClassName() {
		return className;
	}
	public void setClassName(String className) {
		this.className = className;
	}
	public List<String> getRoleList() {
		return roleList;
	}
	public void setRoleList(List<String> roleList) {
		this.roleList = roleList;
	}
	public List<String> getClassList() {
		return classList;
	}
	public void setClassList(List<String> classList) {
		this.classList = classList;
	}
	@Override
	public String toString() {
		return "SearchCondition [name=" + name + ", roleName=" + roleName + ", state=" + state + ", className="
				+ className + ", roleList=" + roleList + ", classList=" + classList + "]";
	}
	
}
